Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
sdf-parser
Advanced tools
Allow to parse a SDF file and convert it to an array of objects.
npm install sdf-parser
In node script:
// allows to parse a file test.sdf that would be present in the same directory
var parse = require('sdf-parser');
var fs = require('fs');
var sdf = fs.readFileSync('./test.sdf', 'utf-8');
var result = parse(sdf);
console.log(result);
options:
var result = parse(sdf, {
exclude: ['Number of H-Donors'],
include: ['Number of H-Donors', 'CLogP', 'Code'],
modifiers: {
CLogP: function(field) {
return {
low: field * 1 - 0.2,
high: field * 1 + 0.2
};
}
},
filter: function(entry) {
return entry.CLogP && entry.CLogP.low > 4;
}
});
This API is only available on Node.js.
Transform an input text stream to a stream of molecule objects.
fullResult
: true to emit the full result of parse
instead of just the molecules.parse
function.const { stream } = require('sdf-parser');
fs.createReadStream('test.sdf')
.pipe(stream.molecules())
.on('data', (molecule) => {
console.log(molecule.molfile);
});
Transform an input text stream to a stream of sdf entries.
const { stream } = require('sdf-parser');
fs.createReadStream('test.sdf')
.pipe(stream.entries())
.on('data', (entry) => {
// sdf entry as a string
});
FAQs
SDF parser
The npm package sdf-parser receives a total of 422 weekly downloads. As such, sdf-parser popularity was classified as not popular.
We found that sdf-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.